<!-- 搜索表单 -->
<template>
  <el-form
    label-width="77px"
    class="ele-form-search"
    @keyup.enter.native="search"
    @submit.native.prevent
  >
    <el-row :gutter="15">
      <el-col :lg="4" :md="12">
        <el-form-item label="类型:">
          <el-select
            v-model="where.type"
            placeholder="请选择"
            clearable
            class="ele-fluid"
          >
            <el-option label="收入" value="1" />
            <el-option label="支出" value="2" />
          </el-select>
        </el-form-item>
      </el-col>

      <el-col :lg="4" :md="12">
        <el-form-item label="方式:">
          <el-select
            v-model="where.way"
            placeholder="请选择"
            clearable
            class="ele-fluid"
          >
            <el-option label="后台" value="0" />
            <el-option label="充值" value="1" />
            <el-option label="视频合成线路三" value="9" />
            <el-option label="视频合成高级版" value="6" />
            <el-option label="声音克隆入门版" value="2" />
            <el-option label="声音克隆高保真" value="3" />
            <el-option label="声音克隆高保真合成" value="8" />
            <el-option label="形象克隆线路三版" value="4" />
            <el-option label="形象克隆高级版" value="7" />
           
          </el-select>
        </el-form-item>
      </el-col>
      
      <el-col :lg="4" :md="12">
        <div class="ele-form-actions">
          <el-button
            type="primary"
            icon="el-icon-search"
            class="ele-btn-icon"
            @click="search"
          >
            查询
          </el-button>
          <el-button @click="reset">重置</el-button>
        </div>
      </el-col>
    </el-row>
  </el-form>
</template>

<script>
  const DEFAULT_WHERE = {
    log_no: '',
    name:'',
    type:'',
    way:''
  };

  export default {
    name: 'AccountLogSearch',
    data() {
      return {
        // 表单数据
        where: { ...DEFAULT_WHERE }
      };
    },
    methods: {
      /* 搜索 */
      search() {
        this.$emit('search', this.where);
      },
      /*  重置 */
      reset() {
        this.where = { ...DEFAULT_WHERE };
        this.search();
      }
    }
  };
</script>
